/**
 * 用户添加 add by gsh
 * @param frm
 * @returns
 */


function checkData(frm){
	var isValid = validator(frm);

	return isValid;	
}

FormValid.showError = function(errMsg, errName, formName) {
    for (key in FormValid.allName) {
        var jctr = $('#errMsg_' + FormValid.allName[key]);
        jctr.removeClass("red").hide();           
    }

    for (key in errMsg) {
        var jctr = $('#errMsg_' + errName[key]);
        jctr.addClass("red").show();
    }
};

$(function(){
	$("#btnSelMerchant").click(function(){	
		var index = msgWnd.open({
			title : "选择商户",
			skin : 'layui-layer-lan',
			type : 2,
			shade : 0.5,
			area : [ "90%", "90%" ],
			maxmin : true,
			content : '/ddl/merchant',
			zIndex : layer.zIndex,
			opener:window
		});
		msgWnd.selectResultCallBack=function(mobj){
			 $("#merchantName").val(mobj.name);
			 $("#merchantId").val(mobj.id);
		};
	});
});







